﻿using DragonSolution.Web.Data.Entity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Script.Serialization;

namespace DragonSolution.Web.UI.DAL
{
    public class BaseController : Controller
    {
        private MyDbContext myDbContext;        

        public BaseController() {
            myDbContext = new MyDbContext();
        }

        public MyDbContext GetContext() {
            if (myDbContext == null)
            {
                myDbContext = new MyDbContext();
            }
            return myDbContext;
        }        
    }
}